package com.fancon.android.gardenjokesx;

import java.util.ArrayList;

import com.fancon.android.application.FanconApplication;
import com.fancon.android.emoji.EmojiUtil;
import com.fancon.android.emoji.IRichGlobalState;
import com.fancon.android.gardenjokesx.entity.Comment;
import com.fancon.android.gardenjokesx.entity.Photo;
import com.fancon.android.gardenjokesx.widget.IGlobalStorage;
/**
 * Gardenjokes Application
 * @author binhbt
 *
 */
public class GardenJokesApplication extends FanconApplication implements IRichGlobalState, IGlobalStorage{
	protected EmojiUtil mEmojiUtil = null;
	protected Photo currentPhoto = null;
	protected int currentPosition;
	protected Boolean isChange = false;
	protected ArrayList<Comment> currentComments = new ArrayList<Comment>();
	@Override
	public EmojiUtil getEmojiUtil() {
		// TODO Auto-generated method stub
		if(mEmojiUtil == null){
			mEmojiUtil = EmojiUtil.getInstance(getAssets(), "emojis");
			mEmojiUtil.getImageGetter().setmContext(getApplicationContext());
		}
		return mEmojiUtil;
	}
	@Override
	public void setCurrentPhoto(Photo photo) {
		// TODO Auto-generated method stub
		this.currentPhoto = photo;
	}
	@Override
	public Photo getCurrentPhoto() {
		// TODO Auto-generated method stub
		return this.currentPhoto;
	}
	@Override
	public void setCurrentPosition(int position) {
		// TODO Auto-generated method stub
		this.currentPosition = position;
	}
	@Override
	public int getCurrentPosition() {
		// TODO Auto-generated method stub
		return this.currentPosition;
	}
	@Override
	public void setCurrentComment(ArrayList<Comment> comments) {
		// TODO Auto-generated method stub
		this.currentComments = comments;
	}
	@Override
	public ArrayList<Comment> getCurrentComment() {
		// TODO Auto-generated method stub
		return this.currentComments;
	}
	@Override
	public void setChange(Boolean isChange) {
		// TODO Auto-generated method stub
		this.isChange = isChange;
	}
	@Override
	public Boolean isChange() {
		// TODO Auto-generated method stub
		return this.isChange;
	}

}
